package cn.guxinhu.billsystem.user.controller;

import cn.guxinhu.billsystem.user.pojo.BillUser;
import cn.guxinhu.billsystem.user.service.impl.UserFindAllServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Guxinhu
 * @create 2021-06-21 15:56
 */
@RestController
public class UserFindAllController {
    /**
     * @Description: 显示数据列表的控制层
     * @Method: OrderFindAllContrller.findAll()
     * @Param: /findAll -- 网页映射路径
     * @Return: users(List < User >) -- User数据集合
     * @Author: Guxinhu
     * @Date Created in 2020/08/19 11:37
     */
    @Autowired
    private UserFindAllServiceImpl userFindAllService;

    @RequestMapping("/user/findAll")
    public List<BillUser> findAll() throws Exception {
        List<BillUser> users = userFindAllService.findAll();
        return users;
    }
}
